package org.emet.entity.biz;

import javax.persistence.Entity;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.emet.help.CGResource;
import org.emet.jee.console.entity.BaseEntity;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "T_MSG")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Message extends BaseEntity {
	@CGResource("标题")
	private String title;
	@CGResource("内容")
	private String content;
	@CGResource("作者")
	private String author;
	//The account id who publish this message.
	@CGResource("发布人")
	private String publisher;

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getPublisher() {
		return publisher;
	}

	public void setPublisher(String publisher) {
		this.publisher = publisher;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}
